/**
 * 日志模块涉及到的路由必须加上pathName !!
 */

export default [
  {
    path: '/users',
    layout: false,
    routes: [{ name: '登录', path: '/users/login', component: './User/Login' }],
  },
  {
    name: '用户管理',
    pathName: 'user',
    icon: 'user',
    path: '/user',
    component: './Users',
    access: 'canAdmin',
  },
  {
    name: '客户管理',
    pathName: 'customer',
    icon: 'teamOutlined',
    path: '/customer',
    component: './Customer',
  },
  {
    name: '供应商管理',
    pathName: 'supplier',
    icon: 'solutionOutlined',
    path: '/supplier',
    component: './Supplier',
  },
  {
    name: '操作日志管理',
    icon: 'fileSearchOutlined',
    path: '/log',
    component: './Log',
    access: 'canAdmin',
    pathName: 'log',
  },
  {
    name: '登陆日志管理',
    icon: 'creditCardOutlined',
    path: '/loginLog',
    component: './LoginLog',
    access: 'canAdmin',
    pathName: 'loginLog',
  },

  { path: '/', redirect: '/workplace' },
  { path: '*', layout: false, component: './404' },

  // {
  //   path: '/admin',
  //   name: '管理页',
  //   icon: 'crown',
  //   access: 'canAdmin',
  //   routes: [
  //     { path: '/admin', redirect: '/admin/sub-page' },
  //     { path: '/admin/sub-page', name: '二级管理页', component: './Admin' },
  //   ],
  // },
  // { name: '查询表格', icon: 'table', path: '/list', component: './TableList' },
];
